<?php
class Avatar{
	function Avatar(){
		include("avatar.methodTable.php");
		include("database.php");
	}
	function getAvatar($userId){
		if (isset($userId)) {
			$WHERE = " WHERE user_bodyelement.userId={$userId}";
			$sql = "SELECT * FROM user_bodyelement INNER JOIN bodyelement ON user_bodyelement.bodyElementId = bodyelement.bodyElementId $WHERE";
			$query = mysql_query($sql);
			$num_rows = mysql_num_rows($query);
			if ($num_rows > 0) {
				return $query;
			} else return false;
		} else return false;
	}
}
?>